import request from '@/utils/request';
import { AxiosPromise } from 'axios';

/**
 * 查询样例单表1列表
 * @param query
 * @returns {*}
 */

export const listExample1 = (query?: Example1VO): AxiosPromise<Example1VO[]> => {
  return request({
    url: '/demo/example1/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询样例单表1详细
 * @param id
 */
export const getExample1 = (id: number): AxiosPromise<Example1VO> => {
  return request({
    url: '/demo/example1/' + id,
    method: 'get'
  });
};

/**
 * 新增样例单表1
 * @param data
 */
export const addExample1 = (data: Example1VO) => {
  return request({
    url: '/demo/example1',
    method: 'post',
    data: data
  });
};

/**
 * 修改样例单表1
 * @param data
 */
export const updateExample1 = (data: Example1VO) => {
  return request({
    url: '/demo/example1',
    method: 'put',
    data: data
  });
};

/**
 * 删除样例单表1
 * @param id
 */
export const delExample1 = (id: number | Array<number>) => {
  return request({
    url: '/demo/example1/' + id,
    method: 'delete'
  });
};

export interface Example1VO extends BaseEntity,PageQuery {
  id?: number;

  name?: string;

  status?: string;

  userId?: number;
  userName?: string;
  deptName?: string;
  customerName?: string;
  sort?: number;
}
